package com.li.commons.util;

import java.text.DecimalFormat;
import java.text.SimpleDateFormat;

import org.apache.commons.lang.math.RandomUtils;

public class OrdersNoUtil {
	
	/**
	 * 生成订单编号
	 * @return
	 */
	public static String generateOrdersNo(){
		String ordersNo = new SimpleDateFormat("yyMMddhhmmss").format(new java.util.Date());
		DecimalFormat df = new DecimalFormat("000");
		ordersNo += df.format(RandomUtils.nextInt(1000));
		return ordersNo;
	}
	
	public static void main(String[] args) {
		System.out.println(generateOrdersNo());
	}

}
